package com.lagou.enums;

/**
 * @Author zhangfd
 * @Date 2020/3/5 13:44
 * @Version 1.0
 * @Describe：
 */
public enum OperTypeEnum {
    SELECT("select","查询操作"),
    INSERT("insert","插入操作"),
    DELETE("delete","删除操作"),
    UPDATE("update","更新操作");

    private String code;

    private String desc;
    OperTypeEnum(String code,String desc){
        this.code = code;
        this.desc = desc;

    }

    public static OperTypeEnum find(String code) {
        OperTypeEnum[] var1 = values();
        int var2 = var1.length;

        for(int var3 = 0; var3 < var2; ++var3) {
            OperTypeEnum frs = var1[var3];
            if (frs.getCode().equals(code)) {
                return frs;
            }
        }

        return null;
    }

    public String getCode() {
        return code;
    }

    public void setCode(String code) {
        this.code = code;
    }

    public String getDesc() {
        return desc;
    }

    public void setDesc(String desc) {
        this.desc = desc;
    }
}
